name: Test App - flagships

# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on:
  push:
    branches: ["release/*"]
  pull_request:
    branches: [master, "release/*"]
    types: [opened, reopened, ready_for_review, synchronize]
    paths:
      - ".github/workflows/_flagship-apps.yml"
      - ".github/workflows/ci-flagship-apps.yml"
      - "github/actions/prep-apps/action.yml"
      - "tests/integrations_app/flagship/**"
  schedule:
    # on Sundays
    - cron: "0 0 * * 0"

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
  test-flagships:
    if: github.event.pull_request.draft == false
    uses: ./.github/workflows/_flagship-apps.yml
    secrets: inherit
